Welcome
Guest
, you are in:
<root>
Elements
•
Login
EventIDE Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
Administration
File Management
Create Account
Search the wiki
Back
Beeper Element
Modified on 2018/07/16 02:01
by
Administrator
Categorized as
Auditory Stimuli
,
Base Elements
,
Elements
<div style="margin-right: 10px; margin-left: 16px; margin-bottom:10px; float: right; width: 500px; overflow: hidden; height: auto; padding: 0px; background: #fafafa; background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));background: -moz-linear-gradient(top, #fbfbfb, #fafafa);border: 1px dashed #ddd;box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ddd, 0 0 0 10px #fff, 0 0 2px 10px #eee;"> == Summary == {s:Element Info Panel | title=Beeper | category=Audio Stimuli | icon=[image|Element Icon|{UP(Beeper Element)}Beeper-Element-Icon.png] | author= OkazoLab | addin= Base Layer | scope= Parent event | usage= Snippets | ownsnippets= None } == Properties == {| |- ! Name ! Description ! Constraints ! Type ! On<br/>runtime<br/>change |- | colspan="5" bgcolor="#AADDDDD" | Settings |- | Test Beep | | {s:atDesign} | Boolean | |- | Working Mode | Defines a mode of producing a beep. If the manual mode is chosen, a beep has to be controlled by setting the Is Playing property. Otherwise, a beep is started automatically at the onset of the parent event. | {s:atDesign} | stBeep.. | |- | colspan="5" bgcolor="#AADDDDD" | Beep |- | Frequency | The beep frequency,in Hz (greater than 0) | {s:atNormal} | Int32 | |- | Duration | Defines the beep duration (in ms). The valid range is [0..10000] | {s:atNormal} | Int32 | |- | colspan="5" bgcolor="#AADDDDD" | Runtime |- | Is Playing | Indicates whether a beep is currently playing (at the runtime). The property can be used to start and stop a beep in the manual mode by assigning a boolean value to it at runtime | {s:atNormal} | Boolean | |- | Start time | Indicates the local event time when a beep has been started (in ms). | {s:atStatus} | clTime | |- | colspan="5" bgcolor="#AADDDDD" | Control |- | Is Enabled | If set to false the element is completely omitted when the experiment is run | {s:atDesign} | Boolean | |- | Title | Title of the element | {s:atDesign} | String | |- |} == == </div> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> '''Beeper Element''' is capable to generate and play a square sound wave (beep) of the requested frequency and duration via PC speaker.The element is a best choice for delivering simple auditory stimuli with the highest temporal precision.{br}{br} {TOC} == Description == Beeps are played by a hardware tone generator called [^http://en.wikipedia.org/wiki/PC_speaker|PC speaker]. Due to simple hardware implementation, the sound generation and playback via PC speaker is characterized by a high temporal precision which is barely possible with the conventional sound cards. However, PC speaker cannot play complex sounds other than single tones and also has a little control on the playback process. You can use this element to generate auditory stimuli in the experimental scenarios where very accurate timing is important and simple sounds are sufficient. If you wish to have more controllable and complex auditory stimuli (still with a good temporal precision of playback) use the [DirectSound-element|DirectSound] element. Alternatively, in scenarios where temporal precision is not necessary you can use the Audio Player element that supports the widest range of sound formats. == Practical Use == The Beeper element can work in one of two working modes that define the synchronization of the sound playback: === Manual working mode === <nowiki>In this mode the element plays a beep on a manual request made in code snippets at will time. The playback is initiated as the element's property [IsPlaying] is assigned to true. Later, the same property can be used to monitor if the initiated beep is still currently playing. [IsPlaying] property automatically turns to false when the initiated playback ends. At this moment and later you can initiate a new playback under a condition that the parent event is still active.</nowiki> === Auto working mode === In this mode the element starts to play a beep synchronously with activation of the parent event. [IsPlaying] property can be used to monitor if the initiated beep is still currently playing. In this working mode you can initiate a playback manually (by assigning true to IsPlaying property) only after the synchronized playback ends. == Notes == * If the element starts generating and playing a beep, it becomes locked in hardware- the playback cannot be stopped before the predefined beep duration is exceeded, even if the parent event is deactivated at that time. Be always aware about how the requested duration matches a flow of your experiment. However, you can initiate a beep in another Beeper element in order to overwrite the currently playing sound in PC speaker. For instance, with this technique, you can initiate a short beep with frequency 1 (unheard) to force the actual silence of the PC speaker at any time. * For better synchronization of the initiated playback (Auto working mode), move the Beeper element at the top of the elements list in the parent event. Elements in the list get to work one by one, as soon as the parent event is activated, so the top position in the list will minimize possible delays. )))
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 5.2.0.8. Some of the icons created by
FamFamFam
.